<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div style="width: 800px;margin: 0 auto;">
	<form action="select" method="get">
		<p style="text-align: center;">品种:<select name="petBreed">
			<option value="">--请选择---</option>
			<option value="狗">狗</option>
			<option value="猫">猫</option>
			<option value="鸟">鸟</option>
			<option value="老鼠">老鼠</option>
		</select>
		<input type="submit" value="查询">
		<a href="add.jsp">新增宠物</a></p>
	</form>
	<table width="800" border="1">
		<tr>
			<th>宠物昵称</th>
			<th>出生日期</th>
			<th>性别</th>
			<th>操作</th>
		</tr>
		<c:forEach items="${petList }" var="pet">
			<tr>
				<td><a href="get?petId=${pet.petId }">${pet.petName }</a></td>	
				<td>${pet.birthday }</td>
				<td>${pet.petSex }</td>
				<td>
					<a href="del?petId=${pet.petId }" class="del">删除</a>
				</td>
			</tr>
		</c:forEach>
	</table>
</div>
</body>
</html>